package org.abacus.platform.workflow;

import java.util.HashSet;
import java.util.Set;

public class EndStation extends AbstractStation {
	private Set<UnterwegsStation> previous = new HashSet<UnterwegsStation>();

	public Set<UnterwegsStation> getPrevious() {
		return previous;
	}

	public void setPrevious(Set<UnterwegsStation> previous) {
		this.previous = previous;
	}

	public WorkStationType getWorkStationType() {
		workStationType = WorkStationType.END;
		return this.workStationType;
	}

	public AbstractStation goNext() {
		return null;
	}

	public AbstractStation goPrevious() {
		for (UnterwegsStation pre : getPrevious()) {
			if (pre.getAttachedAble().doWork()) {
				return pre;
			}
		}
		return null;
	}

}
